package com.yangzb;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author: yangzb
 * @date 2023/1/3 4:36 PM
 **/
@Getter
@Setter
@AllArgsConstructor
public class TaskInfo {
    public TaskInfo(String hdfsFile,String localFile){
        this.hdfsFile = hdfsFile;
        this.localFile = localFile;
    }
    private String hdfsFile;
    private String localFile;

    public boolean isSuccess() {
        return exception != null;
    }

    private Exception exception;
    private FailedStep failedStep;

    public enum FailedStep {
        /**
         * 下载
         */
        DOWNLOAD,
        /**
         * 导入
         */
        IMPORT
    }
}
